#ifndef _Config_H
#define _Config_H
#include <p24FJ16GA002.h>
#include <Generic.h>
#include <OSA.h>




//*************************************************************************/



/******* G E N E R I C   D E F I N I T I O N S ************************************************/

#define	HIGH	1
#define	LOW		0
#define	OUTPUT	0
#define	INPUT 	1
#define	SET		1
#define	CLEAR	0

#define RS_SIZE_OF_MSGQ 10


/**PORT D E F I N I T I O N S ****************************************************/

//UART PORT DEFINITIONS
#define UART_RX_DIRECTION   TRISCbits.TRISC7
#define UART_TX_DIRECTION   TRISCbits.TRISC6
#define UART_RX_STATUS		RCSTA
#define UART_TX_STATUS		TXSTA

//ONE WIRE PORT PIN DEFINITION
///****************************************************
// This Configuration is required to make any PIC MicroController
// I/O pin as Open drain to drive 1-wire.
///****************************************************
#define OW_PIN_DIRECTION 	LATBbits.LATB2
#define OW_WRITE_PIN  		TRISBbits.TRISB2
#define OW_READ_PIN			PORTBbits.RB2

/******* G E N E R I C   D E F I N I T I O N S ************************************************/

#define DELAY_6Us	6
#define DELAY_9Us	9
#define DELAY_10Us	10
#define DELAY_55Us	55
#define DELAY_60Us	60
#define DELAY_64Us	64
#define DELAY_70Us	70
#define DELAY_205Us	205			// DELAY_410Us = DELAY_205Us + DELAY_205Us
#define DELAY_240Us	260			// DELAY_480Us = DELAY_240Us + DELAY_240Us // since the variable is declared as unsigned char


#endif
